package com.econ.powercloud.ems.util;

import com.econ.powercloud.ems.config.EMSStaticMap;
import com.econ.powercloud.ems.constant.SysConstant;
import com.econ.powercloud.ems.dal.entity.EmsDevice;
import com.econ.powercloud.ems.pojo.PidInfoVO;

public class BMSKindUtil {

    /**
     * 根据deviceCode与moduleCode来获取对应簇的信息
     */
    public static String getClusterByCondition(PidInfoVO info){
        if(info.getDeviceCode() ==null || info.getModuleCode()==null){
            return null;
        }
        EmsDevice emsDevice = EMSStaticMap.moduleCodeToDeviceMap.get(info.getDeviceCode() + SysConstant.SPOT + info.getModuleCode());
        return emsDevice == null?null : emsDevice.getDeviceName();
    }

}
